package com.mongodb.pojo;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.annotation.Transient;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

/**
 * @author xiaochi
 * @date 2022/8/16 9:46
 * @desc GroupMemberEntity
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Document("t_group_member")
public class GroupMemberEntity {

    @Id
    private String id;

    @Indexed
    private String groupId;

    @Field("group_head")
    private String groupHead;

    @Field("group_name")
    private String groupName;

    @Indexed
    @Field("user_id")
    private String userId;

    @Field("user_head")
    private String userHead;

    @Field("user_name")
    private String userName;

    @Field("create_time")
    private String createTime;

    @Transient
    private Integer type;
}
